/**
 * 业务模型的事件, 如查询, 插入, 修改, 删除操作
 */
package indi.zjh.dp.orm;

import indi.zjh.dp.db.Session;

public class BusinessEvent {
	public static final int SELECT = 0;
	public static final int INSERT = 1;
	public static final int UPDATE = 2;
	public static final int DELETE = 3;
	
	protected int type;
	protected RelationClass relationClass;
	protected Business object;
	protected Session session;
	
	public BusinessEvent()
	{
		
	}
	
	public void setType(int t)
	{
		this.type = t;
	}
	
	public int getType()
	{
		return this.type;
	}
	
	public void setRelationClass(RelationClass rc)
	{
		this.relationClass = rc;
	}
	
	public RelationClass getRelationClass()
	{
		return this.relationClass;
	}
	
	public void setObject(Business obj)
	{
		this.object = obj;
	}
	
	public Business getObject()
	{
		return this.object;
	}
	
	public void setSession(Session sess)
	{
		this.session = sess;
	}
	
	public Session getSession()
	{
		return this.session;
	}

	@Override
	public String toString() {
		return "BusinessEvent [type=" + type + ", relationClass=" + relationClass + ", object=" + object + "]";
	}
}
